package beyjava.dao;

import java.util.Vector;
import beyjava.model.Task;

/**
 * this class is used for task data access object
 * @author BEYJAVA
 *
 */
public interface TaskDAO {
    /**
     * this method is used to insert new Task 
     * @param task
     * @return true if task is inserted successfully
     */
    public boolean insertTask(Task task);
    /**
     * this method is used to remove chosen task
     * @param taskID
     * @return true if chosen task is removed successfully
     */
    public boolean  removeTask(int taskID);
    /**
     * this method is used to update chosen task
     * @param updatedTask
     * @return true if chosen task is updated successfully
     */
    public boolean updateTask(Task updatedTask);
    /**
     * this method is used to get all tasks of chosen activity
     * @param activityID
     * @return Vector<T> all task informations of chosen activity
     */
    public Vector<Task> getTasksOfActivity(int activityID);
    /**
     * this method is used to get informations of chosen task
     * @param taskID
     * @return Task chosen task
     */
    public Task getTask(int taskID);
    /**
     * this method is used to get all tasks of chosen resouces
     * @param resourceID
     * @return Vector<T> all task informations of chosen resource
     */
    public Vector<Task> getTasksOfResource(int resourceID );
    /**
     * this method is used to assign chosen resource to chosen task
     * @param taskID
     * @param resourceID
     * @return true if resource is assigned successfully
     */
    public boolean assignResourceToTask(int taskID , int resourceID);
    /**
     * this method is used to control assign resource to task operation
     * to avoid same resource - task pair
     * @param taskID
     * @param resourceID
     * @return true if chosen resource is not added chosen task before
     */
    public boolean assignResourceControl(int taskID , int resourceID);
    /**
     * this method is used to unassign chosen reosurce from chosen task
     * @param taskID
     * @param resourceID
     * @return true if resource is unassigned successfully
     */
    public boolean unassignResourceFromTask(int taskID , int resourceID);
}
